"""
数据库模型（Database Model）
Repository层使用，与ORM一一对应
"""
from dataclasses import dataclass
from typing import Optional, Dict, Any
from datetime import datetime
import numpy as np


@dataclass
class FaceModel:
    """
    人脸数据库模型
    Repository层返回给Service层的数据模型
    """
    id: Optional[int] = None
    face_id: str = ""
    person_id: str = ""
    person_name: str = ""
    feature_vector: Optional[np.ndarray] = None
    quality_score: float = 0.0
    face_rect: Optional[Dict[str, int]] = None
    image_path: Optional[str] = None
    meta_info: Optional[Dict[str, Any]] = None
    is_active: bool = True
    created_at: Optional[datetime] = None
    updated_at: Optional[datetime] = None
